package com.example.video.common;

public class ServiceException extends RuntimeException {

    private int code;
    private Object content;

    public ServiceException(ResultStatus resultStatus) {
        super(resultStatus.getMessage());
        this.code = resultStatus.getCode();
    }

    public ServiceException(ResultStatus resultStatus, String message) {
        super(message);
        this.code = resultStatus.getCode();
    }

    public ServiceException(ResultStatus resultStatus, Object content) {
        super(resultStatus.getMessage());
        this.code = resultStatus.getCode();
        this.content = content;
    }

    public ServiceException(ResultStatus resultStatus, String message, Object content) {
        super(message);
        this.code = resultStatus.getCode();
        this.content = content;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public Object getContent() {
        return content;
    }

    public void setContent(Object content) {
        this.content = content;
    }
}
